/**
 * 
 */
package com.maohi.software.tupuna.ui;

import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import com.google.inject.Inject;

/**
 * @author heifara
 * 
 */
public class ImageButton extends JButton {

	private static final long serialVersionUID = 1L;

	public ImageButton() {
	}

	public ImageButton(ImageIcon aIcon) {
		this.setIcon(aIcon);
		this.initUI();
	}

	public ImageButton(ImageIcon aIcon, String aTitle) {
		this.setIcon(aIcon);
		this.setText(aTitle);
		this.initUI();
	}

	@Inject
	protected void initUI() {
		this.setMargin(new Insets(0, 0, 0, 0));
		this.setOpaque(false);
		this.setBorder(BorderFactory.createEmptyBorder());
		this.setContentAreaFilled(false);
	}

}
